<template name="address-diy">
	<view class="address" @tap="chooseAddress">
		<view class="addressImg">
			<image src="/static/images/address-1.png"></image>
		</view>
		<view class="addressBox">
			<view class="addressCon" v-if="address && address.name">
				<view class="addressInfo">
					<text style="margin-right:15px">{{address.name}}</text>{{address.phone}}
				</view>
				<view class="addressDetail">{{address.address}}</view>
			</view>
			<view class="addressCon" v-else>请选择收货地址</view>
		</view>
		<view class="address-arrow">
			<image src="/static/images/arrow-1.png"></image>
		</view>
	</view>
</template>
<script>
	var app = getApp().globalData;
	export default {
		name: 'address',
		props: {
			address: {
				type: Object,
				defalut: {}
			},
		},
		data() {
			return {

			}
		},
		methods: {
			//选择收货地址
			chooseAddress() {
				uni.navigateTo({
					url: '../../mine/MyAddress/MyAddress?type=1'
				});
			},
		},
		computed: {}
	}
</script>
